﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using HFController;

namespace HFWebApp
{
    public partial class zixun : HFController.BagePages
    {
        public List<hf.Model.News> rotationNewsList = new List<hf.Model.News>();
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                //图片新新闻
                picNews_List.DataSource = NewsController.getController().getNewsList(4, "TopicID = 43");
                picNews_List.DataBind();
                //视频新闻，置顶
                video_top_list.DataSource = NewsController.getController().getNewsList(2, "isTop=1 and TopicID=44");
                video_top_list.DataBind();
                //视频新闻列表
                video_list.DataSource = NewsController.getController().getNewsList(6, "TopicID=44");
                video_list.DataBind();

                topNews_list.DataSource = NewsController.getController().getNewsList(1, "isTop=1 and isIndex=1");
                topNews_list.DataBind();

                top_list.DataSource = NewsController.getController().getNewsList(5, "isIndex=1");
                top_list.DataBind();

                //得到轮播新闻列表
                rotationNewsList = NewsController.getController().getNewsList(5, 1);
            }
        }

        public string bClassName(string ID)
        {
            return LegalAffairsController.getController().getLegalAffairsBiglClassModel(int.Parse(ID)).ClassName;
        }
    }
}